#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT([webloglib],[1.0],[puninj@cs.rpi.edu])
AC_CONFIG_SRCDIR([src/LOGR_browsers.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE

AC_ARG_WITH(graphpack,
	[  --with-graphpack=<path> prefix of graphpack header directory],
	[GRAPHPACK=$with_graphpack],
	[if test "$GRAPHPACK" = ""; then AC_MSG_ERROR([this script must be called with --with-graphpack=<path>]); else GRAPHPACK="$GRAPHPACK"; fi])
	AC_SUBST(GRAPHPACK)

AC_ARG_WITH(w3c-libwww,
	[  --with-w3c-libwww=<path> prefix of w3c's www library directory],
	[W3C_WWW=$with_w3c-libwww],
	[
	if test -e "/usr/local/include/w3c-libwww"; then
		W3C_WWW="/usr/local/include/w3c-libwww";
	else
		AC_MSG_ERROR([call this script --with-w3c-libwww])
	fi])
	AC_SUBST(W3C_WWW)
	
AC_ARG_WITH(rx,
	[  --with-rx=<path> prefix of RX library headers],
	[RX=$with_rx])
	AC_SUBST(RX)

AC_ARG_WITH(zlib,
	[  --with-zlib=<path> prefix of zlib header files],
	[ZLIB=$with_zlib])
	AC_SUBST(ZLIB)

# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h sys/time.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM

# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([alarm gethostbyaddr gethostbyname inet_ntoa strcasecmp strchr strrchr strstr strtol])

AC_CONFIG_FILES([Makefile
	src/Makefile])
AC_OUTPUT
